﻿@model Bricks.Site.Models.AlterView
@{
    ViewBag.Title = "Alter";
    Layout = "~/Views/Shared/_UserPage.cshtml";
}

@*引入uEditor*@
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/ueditor.all.js"> </script>
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/lang/zh-cn/zh-cn.js"></script>

<script src="@Url.Content("~/Res/Views/Alter.js")"></script>

<div class="easyui-panel" fit="true">
    <div id="divHolidayRequest" class="easyui-tabs" fit="true" data-options="onSelect:PreviewProcessGraph">
        <div title="过程管理明细" data-options="iconCls:'icon-none'" style="padding: 2px;">
            <div style="min-width: 1200px; overflow: auto">
                <div style="border: 1px solid #ddd; margin-bottom: 3px;">
                    @*<a href="#" id="btnSave" class="easyui-linkbutton" data-options="plain:true" onclick="Save();">保存</a>
                        <a href="#" id="btnCirculation" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-edit'" onclick="Circulation();">发送</a>
                        <a href="#" id="btnWithdraw" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-edit'" onclick="Withdraw();">撤回</a>
                        <a href="#" id="btnBack" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-help'" onclick="Back();">回退</a>
                        <a href="#" id="btnCancel" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-help'" onclick="Cancel();">终止</a>
                        <a href="#" id="btnCirculated" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-edit'" onclick="Circulated();">传阅</a>
                        <a href="#" id="btnReceipt" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-edit'" onclick="Receipt();">已阅</a>
                        <a href="#" id="btnReminders" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-ok'" onclick="Reminders();">催办</a>*@

                    <div id="myTreeToolBar">
                        @Html.Raw(ViewBag.ToolBarInfo)
                        <a href="#" id="btnCancel" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-ok'" onclick="CloseSelf();">关闭</a>
                    </div>
                </div>
                <div style="height: 655px; overflow-y: scroll; ">
                    <div class="easyui-layout" style="min-height: 1300px;">
                        <div region="center" border="false">
                            <div class="easyui-layout" fit="true">
                                <div region="north" split="true" style="width: auto; height: 300px; padding: 1px;">
                                    <form id="frmAlter" method="post" style="min-width: 850px">
                                        <input type="hidden" id="hid" name="ID" value="@Model.ID" />
                                        <input type="hidden" id="hAlterID" name="AlterID" value="@Model.AlterID" />
                                        <input type="hidden" id="hFlowCode" name="FlowCode" value="@Model.FlowCode" />
                                        <input type="hidden" id="hProjectID" name="ProjectID" value="@Model.ProjectID" />
                                        <input type="hidden" id="hRequestPerson" name="RequestPerson" value="@Model.RequestPerson" />
                                        <input type="hidden" id="hRequestDate" name="RequestDate" value="@Model.RequestDate" />
                                        <input type="hidden" id="hHandleState" name="HandleState" value="@Model.HandleState" />
                                        <input type="hidden" id="hAssociatedNodeCode" name="AssociatedNodeCode" value="@Model.AssociatedNodeCode" />
                                        <input type="hidden" id="hLastUpdateUserDepartment" name="LastUpdateUserDepartment" value="@Model.LastUpdateUserDepartment" />
                                        <input type="hidden" id="hLastUpdateUser" name="LastUpdateUser" value="@Model.LastUpdateUser" />

                                        <input type="hidden" id="hAlterBillListJson" name="AlterBillListJson" value="@Model.AlterBillListJson" />
                                        <input type="hidden" id="hSourceType" name="SourceType" value="@Model.SourceType" />
                                        <input type="hidden" id="hProcessType" name="ProcessType" value="@Model.ProcessType" />
                                        <input type="hidden" id="hSourceID" name="SourceID" value="@Model.SourceID" />
                                        <input type="hidden" id="hProcessdOrCirculatedNodeCode" name="ProcessdOrCirculatedNodeCode" value="@Model.ProcessdOrCirculatedNodeCode" />
                                        <input type="hidden" id="hProcessdOrCirculatedUserDepartment" name="ProcessdOrCirculatedUserDepartment" value="@Model.ProcessdOrCirculatedUserDepartment" />
                                        <table style="margin: 1px">
                                            <tr>
                                                <td style="width: 110px; text-align: right">所属项目</td>
                                                <td>
                                                    @*<input id="ProjectID" name="ProjectID" class="easyui-combobox" data-options="required:true" value="@Model.ProjectID" style="width: 180px;" />*@
                                                    <input name="ProjectName" id="ProjectName" class="easyui-textbox" data-options="required:true" value="@Model.ProjectName" style="width: 175px;" readonly />
                                                </td>
                                                <td style="width: 75px; text-align: right">所属标段</td>
                                                <td>
                                                    <input id="ContractID" name="ContractID" class="easyui-combobox" data-options="required:true" value="@Model.ContractID" style="width: 180px;" />
                                                </td>
                                                <td style="width: 90px; text-align: right">变更申请编码</td>
                                                <td>
                                                    <input name="AlterCode" id="AlterCode" class="easyui-textbox" data-options="required:true" value="@Model.AlterCode" style="width: 175px;" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 90px; text-align: right">变更申请名称</td>
                                                <td>
                                                    <input name="AlterName" id="AlterName" class="easyui-textbox" data-options="required:true" value="@Model.AlterName" style="width: 175px;" />
                                                </td>
                                                <td style="width: 110px; text-align: right;">桩号及位置</td>
                                                <td>
                                                    <input name="AlterPosition" id="AlterPosition" class="easyui-textbox" value="@Model.AlterPosition" style="width: 175px;" />
                                                </td>
                                                <td style="width: 75px; text-align: right">变更类别</td>
                                                <td>
                                                    @*<input id="AlterType" name="AlterType" class="easyui-combobox" data-options="required:true" value="@Model.AlterType" style="width: 180px;" />*@
                                                    <input name="AlterType" id="AlterType" class="easyui-textbox" value="@Model.AlterType" style="width: 175px;" readonly />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 110px; text-align: right;">原图名</td>
                                                <td>
                                                    <input name="OriginalChartName" id="OriginalChartName" class="easyui-textbox" value="@Model.OriginalChartName" style="width: 175px;" />
                                                </td>
                                                <td style="width: 75px; text-align: right">变更图名</td>
                                                <td>
                                                    <input name="AlterChartName" id="AlterChartName" class="easyui-textbox" value="@Model.AlterChartName" style="width: 175px; " />
                                                </td>
                                                <td style="width: 90px; text-align: right;">增减额（元）</td>
                                                <td>
                                                    @Html.TextBoxFor(m => m.AlterMoney, new { @readonly = "true", @style = "width:175px;" })
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 110px; text-align: right;">原图号</td>
                                                <td>
                                                    <input name="OriginalChartNo" id="OriginalChartNo" class="easyui-textbox" value="@Model.OriginalChartNo" style="width: 175px" />
                                                </td>
                                                <td style="width: 75px; text-align: right">变更图号</td>
                                                <td>
                                                    <input name="AlterChartNo" id="AlterChartNo" class="easyui-textbox" value="@Model.AlterChartNo" style="width: 175px" />
                                                </td>
                                                <td style="width: 90px; text-align: right">增减工期(天数)</td>
                                                <td>
                                                    <input id="AlterDate" name="AlterDate" class="easyui-textbox" value="@Model.AlterDate" style="width: 175px" />
                                                </td>
                                            </tr>
                                            <tr style="height: 60px">
                                                <td style="width: 110px; text-align: right">工程变更理由及说明</td>
                                                <td colspan="5">
                                                    <textarea id="AlterReason" name="AlterReason">@Model.AlterReason</textarea>
                                                </td>
                                            </tr>
                                        </table>
                                    </form>
                                </div>
                                <div region="center" border="false">
                                    <div class="easyui-layout" fit="true">
                                        <div region="north" style="width: auto; height: 250px; padding: 1px;">
                                            <div id="myBillList" title="变更清单列表" fit="true"></div>
                                        </div>
                                        <div region="center" border="false">
                                            <div class="easyui-layout" fit="true">
                                                <div region="north" title="已办列表" style="width: auto; height: 400px; padding: 1px;">
                                                    <table id="myDataGrid" fit="true"></table>
                                                </div>
                                                <div region="center" border="false">
                                                    <div class="easyui-layout" fit="true">
                                                        <div region="north" title="传阅列表" style="width: auto; height: 200px; padding: 1px;">
                                                            <table id="myCirculatedDataGrid" fit="true"></table>
                                                        </div>
                                                        <div region="center" title="已阅列表" style="width: auto; height: 100px; padding: 1px;">
                                                            <table id="myReceiptDataGrid" fit="true"></table>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="east" region="east" split="true" title="标段清单列表" style="width: 330px; background: #eee; min-width: 230px">
                            <div id="myTreeGrid" fit="true"></div>
                        </div>
                    </div>
                </div>
                <!-- 记录清单列表里面编辑之前的原数量、变更后数量和现单价，用于值超过以后还原 -->
                <input type="hidden" id="hOldOriginalCount" />
                <input type="hidden" id="hOldAfterAlterCount" />
                <input type="hidden" id="hPresentPrice" />
            </div>
        </div>
        <div title="流程图" data-options="iconCls:'icon-none'" style="padding: 10px;">
            <div style="width: 100%; height: 5%;">
                <img alt="" src="../../images/workflow.bmp" />
            </div>
            <div id="graphContainer" style="overflow-y: scroll; width: 100%; height: 95%; background: url('../../images/grid.gif'); cursor: default;">
            </div>
        </div>
    </div>
</div>
<div id="alterWindow"></div>
